package com.tienon.message.Test;

import java.util.Date;

import javax.annotation.Resource;

import org.junit.Test;

import com.tienon.message.entity.Push_App;
import com.tienon.message.mapper.Raw_msg_batchMapper;
import com.tienon.message.thread.task.AppSendMsgDBSubTask;
import com.tienon.message.util.SpringUtil;

public class TestAppSendMsgDBSubTask extends UnitTestEnv {

	@Resource
	private Raw_msg_batchMapper rawDao;

	@Test
	public void test() {

		AppSendMsgDBSubTask subTask = SpringUtil
				.getBean(AppSendMsgDBSubTask.class);
		int i = 0;
		//while (i < 10) {

			Push_App data = new Push_App();
			data.setBatId(888);

			data.setSerial(81);
			data.setSplitId(5);
			data.setFilter(1);
			data.setOccDate(new Date());
			data.setFee(100);
			data.setSendNow(1);
			data.setSendTime(new Date());
			data.setSplitTotal(111);
			data.setMsgType(1);
			data.setMsg("TEST");
			data.setSplitFlag(1);
			data.setSendWay(1);
			data.setBsnCd("123456");
			data.setSendTimes(1);
			data.setFeeType(1);
			data.setOutChannle("1");
			data.setPrior(0);
			data.setReportFlag(1);
			data.setOccDate(new Date());
			data.setLinkFlag(1);
			data.setState(1);
			data.setOccTime(new Date());
			data.setOutChanCustomId("2");
			subTask.addPushAppAndUpdateRawMsgBatch(data);
			i++;
		//}
		System.out.println("END");

	}

}
